
#include <LengthUnit.h>

using namespace std;

const unsigned int __BASE_UNIT__ = 1;

const unsigned int INCH_TO_BASE_UNIT = __BASE_UNIT__;
const unsigned int FEET_TO_BASE_UNIT = 12 * INCH_TO_BASE_UNIT;
const unsigned int YARD_TO_BASE_UNIT = 3 * FEET_TO_BASE_UNIT; 
const unsigned int MILE_TO_BASE_UNIT = 1760 * YARD_TO_BASE_UNIT;

LengthUnit::LengthUnit(unsigned int ammount, const char* pUnitName):Unit(ammount, pUnitName)
{
}

const LengthUnit& LengthUnit::getInchUnit()
{
	static LengthUnit inch(INCH_TO_BASE_UNIT, "INCH");
//	LENGTH_UNIT_CONVERSION.insertNewUnit( inch );

	return inch;
}

const LengthUnit& LengthUnit::getFeetUnit()
{
	static LengthUnit feet(FEET_TO_BASE_UNIT, "FEET");
//	LENGTH_UNIT_CONVERSION.insertNewUnit( feet );
	
	return feet;
}

const LengthUnit& LengthUnit::getYardUnit()
{
	static LengthUnit yard(YARD_TO_BASE_UNIT, "YARD");
//	LENGTH_UNIT_CONVERSION.insertNewUnit( yard );
	
	return yard;
}

const LengthUnit& LengthUnit::getMileUnit()
{
	static LengthUnit mile(MILE_TO_BASE_UNIT, "MILE");
//	LENGTH_UNIT_CONVERSION.insertNewUnit( mile );
	
	return mile;
}



